<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>{:session('cp.cpsysname')}--系统管理平台</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="description" content="{:config('webconfig.description');}">
    <meta name="keywords" content="{:config('webconfig.keywords');}">
    <meta name="author" content="runoob">
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
    <META HTTP-EQUIV="Expires" CONTENT="0">
    <link rel="stylesheet" href="__STATIC_URL__/static/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="__STATIC_URL__/static/css/index.css"/>
    <link rel="stylesheet" href="__STATIC_URL__/static/css/addmchat.css"/>
    <script src="__STATIC_URL__/static/js/jquery-2.1.4.min.js"></script>
    <script src="__STATIC_URL__/static/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script src="__STATIC_URL__/static/js/commen.js" type="text/javascript" charset="utf-8"></script>
    <script src="__STATIC_URL__/static/layer/layer.js"></script>
</head>
<style>
    .filePicker{
        margin-top: -5px;
        width: 150px;
        height: 44px;
        background: #00A2D4;
        color: #fff;
        text-align: center;
        line-height: 44px;
        border-radius: 4px;
        cursor: pointer;
    }
    .file{
        position: absolute;
        left: 14px;
        top: -5px;
        width: 150px;
        height: 44px;
        line-height: 44px;
        opacity: 0;
        cursor: pointer;
    }
    #myTabContent .img-file{
        width: 100px;
        height: 100px;
        display: block;
        margin-left: 26px;
        margin-top: 10px;
        display: none;
    }
    .fade{
        display: none;
    }
    .fade.active{
        display: block;
    }
</style>
<body>

{include file='public/header'/}
<!------------------导航-------------------------->
<section>
    {include file='public/left'/}
    <!--------------------------主要内容区域------------------------------------->
    <div class="content">
        <div class="page-heading mgl15 mgr15">
            <ul class="breadcrumb">
                <li>
                    当前位置是&nbsp;:&nbsp;
                </li>
                <li><a href="javascript:histort.back();">系统管理</a></li>
                <li class="active" style="color: #02b87f;"> 系统设置</li>
            </ul>
        </div>
        <div class="panel panel-default mgl15 mgr15">
            <div class="panel-heading addCharts" style="background:#ededed;">设置修改</div>
            <div class="panel-body">
                <form class="form-horizontal adminex-form" action="" method="post" id="tongdao" enctype="multipart/form-data">
                    <ul class="nav nav-tabs" role="tablist" id="tabs">
                        <li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">开放平台设置</a></li>
                        <li role="presentation"><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">微信消息模板设置</a></li>
                    </ul>
                    <!-- Tab panes -->
                    <div class="tab-content" style="padding-top: 15px;">
                        <div role="tabpanel" class="tab-pane active" id="home">
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">token：</label>
                                <div class="col-sm-10">
                                    <input type="hidden" name="wx_open_id" value="{$sysconfig.wx_open_id}">
                                    <input type="text" name="component_token" class="form-control ipt4" value="{$sysconfig.component_token}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">AesKey：</label>
                                <div class="col-sm-10">
                                    <input type="text" name="component_encodingaeskey" class="form-control ipt4" value="{$sysconfig.component_encodingaeskey}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">Appid：</label>
                                <div class="col-sm-10">
                                    <input type="text" name="component_appid" class="form-control ipt4" value="{$sysconfig.component_appid}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">AppSecret：</label>
                                <div class="col-sm-10">
                                    <input type="text" name="component_appsecret" class="form-control ipt4" value="{$sysconfig.component_appsecret}">
                                </div>
                            </div>
                        </div>
                        <div role="tabpanel" class="tab-pane" id="profile">
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">支付通知模板：</label>
                                <div class="col-sm-10">
                                    <input type="text" name="pay_tpl_id" class="form-control ipt4" value="{$sysconfig.pay_tpl_id}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">会员卡余额变动模板：</label>
                                <div class="col-sm-10">
                                    <input type="text" name="card_ye_tpl_id" class="form-control ipt4" value="{$sysconfig.card_ye_tpl_id}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">会员卡卡券赠送模板：</label>
                                <div class="col-sm-10">
                                    <input type="text" name="card_zs_tpl_id" class="form-control ipt4" value="{$sysconfig.card_zs_tpl_id}">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div style="text-align: center">
                        <button type="button" id="sure" class="btn btn-primary">确认修改</button>
                    </div>
                </form>
            </div>
        </div>
        {include file='public/footer'/}
    </div>
</section>
<script src="__STATIC_URL__/static/layer/layer.js"></script>
<script>
    $(function(){
        $("#sure").click(function(){
            $.ajax({
                url:"{:url('system/syssetting')}",
                data:$("#tongdao").serialize(),
                type:"post",
                success:function(data){
                    layer.msg(data.message,{icon:1});
                }
            })
        })
    })
</script>

</body>
</html>
